def create_app(_name):
    from flask import Flask
    from flask_migrate import Migrate
    from views import register_blueprints

    app = Flask(_name)
    app.config.from_object("com.config")

    register_blueprints(app)

    from com.models import db

    db.init_app(app)

    migrate = Migrate()
    migrate.init_app(app, db)

    return app
